﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Telerik.Web.UI;
using System.IO;
using KPIS.GERP.GFMS.IBLL;
using KPIS.GERP.GFMS.BLL;
using KPIS.GERP.GFMS.MODEL;

using KPIS.GERP.GFMS.APP.App_UI.Commons;
using KPIS.GERP.GFMS.DAL;

namespace KPIS.GERP.GFMS.APP.App_UI.Forms
{
    public partial class FIM_PaymentCheques : System.Web.UI.Page
    {
        Main main = new Main();
        IBLL_FIM_PaymentCheques pc = new B_FIM_PaymentCheques();
        IBLL_FIM_Payments pay = new B_FIM_Payments();
        //D_FIM_MAS_BankBranchs branch = new D_FIM_MAS_BankBranchs();
        //D_FIM_MAS_BankInterestRates rate = new D_FIM_MAS_BankInterestRates();
        //D_FIM_MAS_BankAccountTypes acctype = new D_FIM_MAS_BankAccountTypes();
        //D_HRM_MAS_Districts dis = new D_HRM_MAS_Districts();
        //D_HRM_MAS_Countries country = new D_HRM_MAS_Countries();

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string strCheque = Request.QueryString["ChequeSeq"];
            }
        }

        protected void LoadRadGrid1()
        {
            RadGrid1.DataSource = pc.GetFull(null, Request.QueryString["ChequeSeq"]);
            SumMoney();
        }



        protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
        {
            if (!e.IsFromDetailTable)
            {
                LoadRadGrid1();
            }
        }

        public void SumMoney()
        {
            string strCheque = Request.QueryString["ChequeSeq"];
            lblSumMoney.Text = pc.SumMoney(strCheque);
        }
        
    }
}
